3.9.19 \(\int \frac {(d+e x)^3 (a+b x+c x^2)}{\sqrt {f+g x}} \, dx\) [819]

Optimal. Leaf size=287 \[ -\frac {2 (e f-d g)^3 \left (c f^2-b f g+a g^2\right ) \sqrt {f+g x}}{g^6}+\frac {2 (e f-d g)^2 (c f (5 e f-2 d g)-g (4 b e f-b d g-3 a e g)) (f+g x)^{3/2}}{3 g^6}+\frac {2 (e f-d g) \left (3 e g (2 b e f-b d g-a e g)-c \left (10 e^2 f^2-8 d e f g+d^2 g^2\right )\right ) (f+g x)^{5/2}}{5 g^6}-\frac {2 e \left (e g (4 b e f-3 b d g-a e g)-c \left (10 e^2 f^2-12 d e f g+3 d^2 g^2\right )\right ) (f+g x)^{7/2}}{7 g^6}-\frac {2 e^2 (5 c e f-3 c d g-b e g) (f+g x)^{9/2}}{9 g^6}+\frac {2 c e^3 (f+g x)^{11/2}}{11 g^6} \]

[Out]

2/3*(-d*g+e*f)^2*(c*f*(-2*d*g+5*e*f)-g*(-3*a*e*g-b*d*g+4*b*e*f))*(g*x+f)^(3/2)/g^6+2/5*(-d*g+e*f)*(3*e*g*(-a*e
*g-b*d*g+2*b*e*f)-c*(d^2*g^2-8*d*e*f*g+10*e^2*f^2))*(g*x+f)^(5/2)/g^6-2/7*e*(e*g*(-a*e*g-3*b*d*g+4*b*e*f)-c*(3
*d^2*g^2-12*d*e*f*g+10*e^2*f^2))*(g*x+f)^(7/2)/g^6-2/9*e^2*(-b*e*g-3*c*d*g+5*c*e*f)*(g*x+f)^(9/2)/g^6+2/11*c*e
^3*(g*x+f)^(11/2)/g^6-2*(-d*g+e*f)^3*(a*g^2-b*f*g+c*f^2)*(g*x+f)^(1/2)/g^6

________________________________________________________________________________________

Rubi [A]
time = 0.32, antiderivative size = 287, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {911, 1167} \begin {gather*} -\frac {2 e (f+g x)^{7/2} \left (e g (-a e g-3 b d g+4 b e f)-c \left (3 d^2 g^2-12 d e f g+10 e^2 f^2\right )\right )}{7 g^6}+\frac {2 (f+g x)^{5/2} (e f-d g) \left (3 e g (-a e g-b d g+2 b e f)-c \left (d^2 g^2-8 d e f g+10 e^2 f^2\right )\right )}{5 g^6}-\frac {2 \sqrt {f+g x} (e f-d g)^3 \left (a g^2-b f g+c f^2\right )}{g^6}+\frac {2 (f+g x)^{3/2} (e f-d g)^2 (c f (5 e f-2 d g)-g (-3 a e g-b d g+4 b e f))}{3 g^6}-\frac {2 e^2 (f+g x)^{9/2} (-b e g-3 c d g+5 c e f)}{9 g^6}+\frac {2 c e^3 (f+g x)^{11/2}}{11 g^6} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^3*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(-2*(e*f - d*g)^3*(c*f^2 - b*f*g + a*g^2)*Sqrt[f + g*x])/g^6 + (2*(e*f - d*g)^2*(c*f*(5*e*f - 2*d*g) - g*(4*b*
e*f - b*d*g - 3*a*e*g))*(f + g*x)^(3/2))/(3*g^6) + (2*(e*f - d*g)*(3*e*g*(2*b*e*f - b*d*g - a*e*g) - c*(10*e^2
*f^2 - 8*d*e*f*g + d^2*g^2))*(f + g*x)^(5/2))/(5*g^6) - (2*e*(e*g*(4*b*e*f - 3*b*d*g - a*e*g) - c*(10*e^2*f^2
- 12*d*e*f*g + 3*d^2*g^2))*(f + g*x)^(7/2))/(7*g^6) - (2*e^2*(5*c*e*f - 3*c*d*g - b*e*g)*(f + g*x)^(9/2))/(9*g
^6) + (2*c*e^3*(f + g*x)^(11/2))/(11*g^6)

Rule 911

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + g*(x^q/e))^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - (2*c*d - b*e)*(x^q/e^2) + c*(x^(2*q)/e^2))^p, x], x, (d + e*x)^(1/q)], x]] /; FreeQ[{a, b, c
, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegersQ[n,
 p] && FractionQ[m]

Rule 1167

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps

\begin {align*} \int \frac {(d+e x)^3 \left (a+b x+c x^2\right )}{\sqrt {f+g x}} \, dx &=\frac {2 \text {Subst}\left (\int \left (\frac {-e f+d g}{g}+\frac {e x^2}{g}\right )^3 \left (\frac {c f^2-b f g+a g^2}{g^2}-\frac {(2 c f-b g) x^2}{g^2}+\frac {c x^4}{g^2}\right ) \, dx,x,\sqrt {f+g x}\right )}{g}\\ &=\frac {2 \text {Subst}\left (\int \left (\frac {(-e f+d g)^3 \left (c f^2-b f g+a g^2\right )}{g^5}+\frac {(e f-d g)^2 (c f (5 e f-2 d g)-g (4 b e f-b d g-3 a e g)) x^2}{g^5}+\frac {(e f-d g) \left (3 e g (2 b e f-b d g-a e g)-c \left (10 e^2 f^2-8 d e f g+d^2 g^2\right )\right ) x^4}{g^5}+\frac {e \left (-e g (4 b e f-3 b d g-a e g)+c \left (10 e^2 f^2-12 d e f g+3 d^2 g^2\right )\right ) x^6}{g^5}+\frac {e^2 (-5 c e f+3 c d g+b e g) x^8}{g^5}+\frac {c e^3 x^{10}}{g^5}\right ) \, dx,x,\sqrt {f+g x}\right )}{g}\\ &=-\frac {2 (e f-d g)^3 \left (c f^2-b f g+a g^2\right ) \sqrt {f+g x}}{g^6}+\frac {2 (e f-d g)^2 (c f (5 e f-2 d g)-g (4 b e f-b d g-3 a e g)) (f+g x)^{3/2}}{3 g^6}+\frac {2 (e f-d g) \left (3 e g (2 b e f-b d g-a e g)-c \left (10 e^2 f^2-8 d e f g+d^2 g^2\right )\right ) (f+g x)^{5/2}}{5 g^6}-\frac {2 e \left (e g (4 b e f-3 b d g-a e g)-c \left (10 e^2 f^2-12 d e f g+3 d^2 g^2\right )\right ) (f+g x)^{7/2}}{7 g^6}-\frac {2 e^2 (5 c e f-3 c d g-b e g) (f+g x)^{9/2}}{9 g^6}+\frac {2 c e^3 (f+g x)^{11/2}}{11 g^6}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.32, size = 412, normalized size = 1.44 \begin {gather*} \frac {2 \sqrt {f+g x} \left (c \left (231 d^3 g^3 \left (8 f^2-4 f g x+3 g^2 x^2\right )+297 d^2 e g^2 \left (-16 f^3+8 f^2 g x-6 f g^2 x^2+5 g^3 x^3\right )+33 d e^2 g \left (128 f^4-64 f^3 g x+48 f^2 g^2 x^2-40 f g^3 x^3+35 g^4 x^4\right )-5 e^3 \left (256 f^5-128 f^4 g x+96 f^3 g^2 x^2-80 f^2 g^3 x^3+70 f g^4 x^4-63 g^5 x^5\right )\right )+11 g \left (9 a g \left (35 d^3 g^3+35 d^2 e g^2 (-2 f+g x)+7 d e^2 g \left (8 f^2-4 f g x+3 g^2 x^2\right )+e^3 \left (-16 f^3+8 f^2 g x-6 f g^2 x^2+5 g^3 x^3\right )\right )+b \left (105 d^3 g^3 (-2 f+g x)+63 d^2 e g^2 \left (8 f^2-4 f g x+3 g^2 x^2\right )+27 d e^2 g \left (-16 f^3+8 f^2 g x-6 f g^2 x^2+5 g^3 x^3\right )+e^3 \left (128 f^4-64 f^3 g x+48 f^2 g^2 x^2-40 f g^3 x^3+35 g^4 x^4\right )\right )\right )\right )}{3465 g^6} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^3*(a + b*x + c*x^2))/Sqrt[f + g*x],x]

[Out]

(2*Sqrt[f + g*x]*(c*(231*d^3*g^3*(8*f^2 - 4*f*g*x + 3*g^2*x^2) + 297*d^2*e*g^2*(-16*f^3 + 8*f^2*g*x - 6*f*g^2*
x^2 + 5*g^3*x^3) + 33*d*e^2*g*(128*f^4 - 64*f^3*g*x + 48*f^2*g^2*x^2 - 40*f*g^3*x^3 + 35*g^4*x^4) - 5*e^3*(256
*f^5 - 128*f^4*g*x + 96*f^3*g^2*x^2 - 80*f^2*g^3*x^3 + 70*f*g^4*x^4 - 63*g^5*x^5)) + 11*g*(9*a*g*(35*d^3*g^3 +
 35*d^2*e*g^2*(-2*f + g*x) + 7*d*e^2*g*(8*f^2 - 4*f*g*x + 3*g^2*x^2) + e^3*(-16*f^3 + 8*f^2*g*x - 6*f*g^2*x^2
+ 5*g^3*x^3)) + b*(105*d^3*g^3*(-2*f + g*x) + 63*d^2*e*g^2*(8*f^2 - 4*f*g*x + 3*g^2*x^2) + 27*d*e^2*g*(-16*f^3
 + 8*f^2*g*x - 6*f*g^2*x^2 + 5*g^3*x^3) + e^3*(128*f^4 - 64*f^3*g*x + 48*f^2*g^2*x^2 - 40*f*g^3*x^3 + 35*g^4*x
^4)))))/(3465*g^6)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 285, normalized size = 0.99 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^3*(c*x^2+b*x+a)/(g*x+f)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/g^6*(1/11*c*e^3*(g*x+f)^(11/2)+1/9*(3*(d*g-e*f)*e^2*c+e^3*(b*g-2*c*f))*(g*x+f)^(9/2)+1/7*(3*(d*g-e*f)^2*e*c+
3*(d*g-e*f)*e^2*(b*g-2*c*f)+e^3*(a*g^2-b*f*g+c*f^2))*(g*x+f)^(7/2)+1/5*((d*g-e*f)^3*c+3*(d*g-e*f)^2*e*(b*g-2*c
*f)+3*(d*g-e*f)*e^2*(a*g^2-b*f*g+c*f^2))*(g*x+f)^(5/2)+1/3*((d*g-e*f)^3*(b*g-2*c*f)+3*(d*g-e*f)^2*e*(a*g^2-b*f
*g+c*f^2))*(g*x+f)^(3/2)+(d*g-e*f)^3*(a*g^2-b*f*g+c*f^2)*(g*x+f)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 411, normalized size = 1.43 \begin {gather*} \frac {2 \, {\left (315 \, {\left (g x + f\right )}^{\frac {11}{2}} c e^{3} - 385 \, {\left (5 \, c f e^{3} - {\left (3 \, c d e^{2} + b e^{3}\right )} g\right )} {\left (g x + f\right )}^{\frac {9}{2}} + 495 \, {\left (10 \, c f^{2} e^{3} - 4 \, {\left (3 \, c d e^{2} + b e^{3}\right )} f g + {\left (3 \, c d^{2} e + 3 \, b d e^{2} + a e^{3}\right )} g^{2}\right )} {\left (g x + f\right )}^{\frac {7}{2}} - 693 \, {\left (10 \, c f^{3} e^{3} - 6 \, {\left (3 \, c d e^{2} + b e^{3}\right )} f^{2} g + 3 \, {\left (3 \, c d^{2} e + 3 \, b d e^{2} + a e^{3}\right )} f g^{2} - {\left (c d^{3} + 3 \, b d^{2} e + 3 \, a d e^{2}\right )} g^{3}\right )} {\left (g x + f\right )}^{\frac {5}{2}} + 1155 \, {\left (5 \, c f^{4} e^{3} - 4 \, {\left (3 \, c d e^{2} + b e^{3}\right )} f^{3} g + 3 \, {\left (3 \, c d^{2} e + 3 \, b d e^{2} + a e^{3}\right )} f^{2} g^{2} - 2 \, {\left (c d^{3} + 3 \, b d^{2} e + 3 \, a d e^{2}\right )} f g^{3} + {\left (b d^{3} + 3 \, a d^{2} e\right )} g^{4}\right )} {\left (g x + f\right )}^{\frac {3}{2}} + 3465 \, {\left (a d^{3} g^{5} - c f^{5} e^{3} + {\left (3 \, c d e^{2} + b e^{3}\right )} f^{4} g - {\left (3 \, c d^{2} e + 3 \, b d e^{2} + a e^{3}\right )} f^{3} g^{2} + {\left (c d^{3} + 3 \, b d^{2} e + 3 \, a d e^{2}\right )} f^{2} g^{3} - {\left (b d^{3} + 3 \, a d^{2} e\right )} f g^{4}\right )} \sqrt {g x + f}\right )}}{3465 \, g^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="maxima")

[Out]

2/3465*(315*(g*x + f)^(11/2)*c*e^3 - 385*(5*c*f*e^3 - (3*c*d*e^2 + b*e^3)*g)*(g*x + f)^(9/2) + 495*(10*c*f^2*e
^3 - 4*(3*c*d*e^2 + b*e^3)*f*g + (3*c*d^2*e + 3*b*d*e^2 + a*e^3)*g^2)*(g*x + f)^(7/2) - 693*(10*c*f^3*e^3 - 6*
(3*c*d*e^2 + b*e^3)*f^2*g + 3*(3*c*d^2*e + 3*b*d*e^2 + a*e^3)*f*g^2 - (c*d^3 + 3*b*d^2*e + 3*a*d*e^2)*g^3)*(g*
x + f)^(5/2) + 1155*(5*c*f^4*e^3 - 4*(3*c*d*e^2 + b*e^3)*f^3*g + 3*(3*c*d^2*e + 3*b*d*e^2 + a*e^3)*f^2*g^2 - 2
*(c*d^3 + 3*b*d^2*e + 3*a*d*e^2)*f*g^3 + (b*d^3 + 3*a*d^2*e)*g^4)*(g*x + f)^(3/2) + 3465*(a*d^3*g^5 - c*f^5*e^
3 + (3*c*d*e^2 + b*e^3)*f^4*g - (3*c*d^2*e + 3*b*d*e^2 + a*e^3)*f^3*g^2 + (c*d^3 + 3*b*d^2*e + 3*a*d*e^2)*f^2*
g^3 - (b*d^3 + 3*a*d^2*e)*f*g^4)*sqrt(g*x + f))/g^6

________________________________________________________________________________________

Fricas [A]
time = 2.19, size = 458, normalized size = 1.60 \begin {gather*} \frac {2 \, {\left (693 \, c d^{3} g^{5} x^{2} + 1848 \, c d^{3} f^{2} g^{3} - 2310 \, b d^{3} f g^{4} + 3465 \, a d^{3} g^{5} - 231 \, {\left (4 \, c d^{3} f g^{4} - 5 \, b d^{3} g^{5}\right )} x + {\left (315 \, c g^{5} x^{5} - 1280 \, c f^{5} + 1408 \, b f^{4} g - 1584 \, a f^{3} g^{2} - 35 \, {\left (10 \, c f g^{4} - 11 \, b g^{5}\right )} x^{4} + 5 \, {\left (80 \, c f^{2} g^{3} - 88 \, b f g^{4} + 99 \, a g^{5}\right )} x^{3} - 6 \, {\left (80 \, c f^{3} g^{2} - 88 \, b f^{2} g^{3} + 99 \, a f g^{4}\right )} x^{2} + 8 \, {\left (80 \, c f^{4} g - 88 \, b f^{3} g^{2} + 99 \, a f^{2} g^{3}\right )} x\right )} e^{3} + 33 \, {\left (35 \, c d g^{5} x^{4} + 128 \, c d f^{4} g - 144 \, b d f^{3} g^{2} + 168 \, a d f^{2} g^{3} - 5 \, {\left (8 \, c d f g^{4} - 9 \, b d g^{5}\right )} x^{3} + 3 \, {\left (16 \, c d f^{2} g^{3} - 18 \, b d f g^{4} + 21 \, a d g^{5}\right )} x^{2} - 4 \, {\left (16 \, c d f^{3} g^{2} - 18 \, b d f^{2} g^{3} + 21 \, a d f g^{4}\right )} x\right )} e^{2} + 99 \, {\left (15 \, c d^{2} g^{5} x^{3} - 48 \, c d^{2} f^{3} g^{2} + 56 \, b d^{2} f^{2} g^{3} - 70 \, a d^{2} f g^{4} - 3 \, {\left (6 \, c d^{2} f g^{4} - 7 \, b d^{2} g^{5}\right )} x^{2} + {\left (24 \, c d^{2} f^{2} g^{3} - 28 \, b d^{2} f g^{4} + 35 \, a d^{2} g^{5}\right )} x\right )} e\right )} \sqrt {g x + f}}{3465 \, g^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="fricas")

[Out]

2/3465*(693*c*d^3*g^5*x^2 + 1848*c*d^3*f^2*g^3 - 2310*b*d^3*f*g^4 + 3465*a*d^3*g^5 - 231*(4*c*d^3*f*g^4 - 5*b*
d^3*g^5)*x + (315*c*g^5*x^5 - 1280*c*f^5 + 1408*b*f^4*g - 1584*a*f^3*g^2 - 35*(10*c*f*g^4 - 11*b*g^5)*x^4 + 5*
(80*c*f^2*g^3 - 88*b*f*g^4 + 99*a*g^5)*x^3 - 6*(80*c*f^3*g^2 - 88*b*f^2*g^3 + 99*a*f*g^4)*x^2 + 8*(80*c*f^4*g
- 88*b*f^3*g^2 + 99*a*f^2*g^3)*x)*e^3 + 33*(35*c*d*g^5*x^4 + 128*c*d*f^4*g - 144*b*d*f^3*g^2 + 168*a*d*f^2*g^3
 - 5*(8*c*d*f*g^4 - 9*b*d*g^5)*x^3 + 3*(16*c*d*f^2*g^3 - 18*b*d*f*g^4 + 21*a*d*g^5)*x^2 - 4*(16*c*d*f^3*g^2 -
18*b*d*f^2*g^3 + 21*a*d*f*g^4)*x)*e^2 + 99*(15*c*d^2*g^5*x^3 - 48*c*d^2*f^3*g^2 + 56*b*d^2*f^2*g^3 - 70*a*d^2*
f*g^4 - 3*(6*c*d^2*f*g^4 - 7*b*d^2*g^5)*x^2 + (24*c*d^2*f^2*g^3 - 28*b*d^2*f*g^4 + 35*a*d^2*g^5)*x)*e)*sqrt(g*
x + f)/g^6

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1544 vs. \(2 (291) = 582\).
time = 73.95, size = 1544, normalized size = 5.38 \begin {gather*} \begin {cases} \frac {- \frac {2 a d^{3} f}{\sqrt {f + g x}} - 2 a d^{3} \left (- \frac {f}{\sqrt {f + g x}} - \sqrt {f + g x}\right ) - \frac {6 a d^{2} e f \left (- \frac {f}{\sqrt {f + g x}} - \sqrt {f + g x}\right )}{g} - \frac {6 a d^{2} e \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g} - \frac {6 a d e^{2} f \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g^{2}} - \frac {6 a d e^{2} \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{2}} - \frac {2 a e^{3} f \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{3}} - \frac {2 a e^{3} \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{3}} - \frac {2 b d^{3} f \left (- \frac {f}{\sqrt {f + g x}} - \sqrt {f + g x}\right )}{g} - \frac {2 b d^{3} \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g} - \frac {6 b d^{2} e f \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g^{2}} - \frac {6 b d^{2} e \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{2}} - \frac {6 b d e^{2} f \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{3}} - \frac {6 b d e^{2} \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{3}} - \frac {2 b e^{3} f \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{4}} - \frac {2 b e^{3} \left (- \frac {f^{5}}{\sqrt {f + g x}} - 5 f^{4} \sqrt {f + g x} + \frac {10 f^{3} \left (f + g x\right )^{\frac {3}{2}}}{3} - 2 f^{2} \left (f + g x\right )^{\frac {5}{2}} + \frac {5 f \left (f + g x\right )^{\frac {7}{2}}}{7} - \frac {\left (f + g x\right )^{\frac {9}{2}}}{9}\right )}{g^{4}} - \frac {2 c d^{3} f \left (\frac {f^{2}}{\sqrt {f + g x}} + 2 f \sqrt {f + g x} - \frac {\left (f + g x\right )^{\frac {3}{2}}}{3}\right )}{g^{2}} - \frac {2 c d^{3} \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{2}} - \frac {6 c d^{2} e f \left (- \frac {f^{3}}{\sqrt {f + g x}} - 3 f^{2} \sqrt {f + g x} + f \left (f + g x\right )^{\frac {3}{2}} - \frac {\left (f + g x\right )^{\frac {5}{2}}}{5}\right )}{g^{3}} - \frac {6 c d^{2} e \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{3}} - \frac {6 c d e^{2} f \left (\frac {f^{4}}{\sqrt {f + g x}} + 4 f^{3} \sqrt {f + g x} - 2 f^{2} \left (f + g x\right )^{\frac {3}{2}} + \frac {4 f \left (f + g x\right )^{\frac {5}{2}}}{5} - \frac {\left (f + g x\right )^{\frac {7}{2}}}{7}\right )}{g^{4}} - \frac {6 c d e^{2} \left (- \frac {f^{5}}{\sqrt {f + g x}} - 5 f^{4} \sqrt {f + g x} + \frac {10 f^{3} \left (f + g x\right )^{\frac {3}{2}}}{3} - 2 f^{2} \left (f + g x\right )^{\frac {5}{2}} + \frac {5 f \left (f + g x\right )^{\frac {7}{2}}}{7} - \frac {\left (f + g x\right )^{\frac {9}{2}}}{9}\right )}{g^{4}} - \frac {2 c e^{3} f \left (- \frac {f^{5}}{\sqrt {f + g x}} - 5 f^{4} \sqrt {f + g x} + \frac {10 f^{3} \left (f + g x\right )^{\frac {3}{2}}}{3} - 2 f^{2} \left (f + g x\right )^{\frac {5}{2}} + \frac {5 f \left (f + g x\right )^{\frac {7}{2}}}{7} - \frac {\left (f + g x\right )^{\frac {9}{2}}}{9}\right )}{g^{5}} - \frac {2 c e^{3} \left (\frac {f^{6}}{\sqrt {f + g x}} + 6 f^{5} \sqrt {f + g x} - 5 f^{4} \left (f + g x\right )^{\frac {3}{2}} + 4 f^{3} \left (f + g x\right )^{\frac {5}{2}} - \frac {15 f^{2} \left (f + g x\right )^{\frac {7}{2}}}{7} + \frac {2 f \left (f + g x\right )^{\frac {9}{2}}}{3} - \frac {\left (f + g x\right )^{\frac {11}{2}}}{11}\right )}{g^{5}}}{g} & \text {for}\: g \neq 0 \\\frac {a d^{3} x + \frac {c e^{3} x^{6}}{6} + \frac {x^{5} \left (b e^{3} + 3 c d e^{2}\right )}{5} + \frac {x^{4} \left (a e^{3} + 3 b d e^{2} + 3 c d^{2} e\right )}{4} + \frac {x^{3} \cdot \left (3 a d e^{2} + 3 b d^{2} e + c d^{3}\right )}{3} + \frac {x^{2} \cdot \left (3 a d^{2} e + b d^{3}\right )}{2}}{\sqrt {f}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**3*(c*x**2+b*x+a)/(g*x+f)**(1/2),x)

[Out]

Piecewise(((-2*a*d**3*f/sqrt(f + g*x) - 2*a*d**3*(-f/sqrt(f + g*x) - sqrt(f + g*x)) - 6*a*d**2*e*f*(-f/sqrt(f
+ g*x) - sqrt(f + g*x))/g - 6*a*d**2*e*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g - 6*a*d
*e**2*f*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g**2 - 6*a*d*e**2*(-f**3/sqrt(f + g*x) -
 3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)**(5/2)/5)/g**2 - 2*a*e**3*f*(-f**3/sqrt(f + g*x) - 3*f*
*2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)**(5/2)/5)/g**3 - 2*a*e**3*(f**4/sqrt(f + g*x) + 4*f**3*sqrt(
f + g*x) - 2*f**2*(f + g*x)**(3/2) + 4*f*(f + g*x)**(5/2)/5 - (f + g*x)**(7/2)/7)/g**3 - 2*b*d**3*f*(-f/sqrt(f
 + g*x) - sqrt(f + g*x))/g - 2*b*d**3*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g - 6*b*d*
*2*e*f*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) - (f + g*x)**(3/2)/3)/g**2 - 6*b*d**2*e*(-f**3/sqrt(f + g*x) -
3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)**(5/2)/5)/g**2 - 6*b*d*e**2*f*(-f**3/sqrt(f + g*x) - 3*f
**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)**(5/2)/5)/g**3 - 6*b*d*e**2*(f**4/sqrt(f + g*x) + 4*f**3*sq
rt(f + g*x) - 2*f**2*(f + g*x)**(3/2) + 4*f*(f + g*x)**(5/2)/5 - (f + g*x)**(7/2)/7)/g**3 - 2*b*e**3*f*(f**4/s
qrt(f + g*x) + 4*f**3*sqrt(f + g*x) - 2*f**2*(f + g*x)**(3/2) + 4*f*(f + g*x)**(5/2)/5 - (f + g*x)**(7/2)/7)/g
**4 - 2*b*e**3*(-f**5/sqrt(f + g*x) - 5*f**4*sqrt(f + g*x) + 10*f**3*(f + g*x)**(3/2)/3 - 2*f**2*(f + g*x)**(5
/2) + 5*f*(f + g*x)**(7/2)/7 - (f + g*x)**(9/2)/9)/g**4 - 2*c*d**3*f*(f**2/sqrt(f + g*x) + 2*f*sqrt(f + g*x) -
 (f + g*x)**(3/2)/3)/g**2 - 2*c*d**3*(-f**3/sqrt(f + g*x) - 3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g
*x)**(5/2)/5)/g**2 - 6*c*d**2*e*f*(-f**3/sqrt(f + g*x) - 3*f**2*sqrt(f + g*x) + f*(f + g*x)**(3/2) - (f + g*x)
**(5/2)/5)/g**3 - 6*c*d**2*e*(f**4/sqrt(f + g*x) + 4*f**3*sqrt(f + g*x) - 2*f**2*(f + g*x)**(3/2) + 4*f*(f + g
*x)**(5/2)/5 - (f + g*x)**(7/2)/7)/g**3 - 6*c*d*e**2*f*(f**4/sqrt(f + g*x) + 4*f**3*sqrt(f + g*x) - 2*f**2*(f
+ g*x)**(3/2) + 4*f*(f + g*x)**(5/2)/5 - (f + g*x)**(7/2)/7)/g**4 - 6*c*d*e**2*(-f**5/sqrt(f + g*x) - 5*f**4*s
qrt(f + g*x) + 10*f**3*(f + g*x)**(3/2)/3 - 2*f**2*(f + g*x)**(5/2) + 5*f*(f + g*x)**(7/2)/7 - (f + g*x)**(9/2
)/9)/g**4 - 2*c*e**3*f*(-f**5/sqrt(f + g*x) - 5*f**4*sqrt(f + g*x) + 10*f**3*(f + g*x)**(3/2)/3 - 2*f**2*(f +
g*x)**(5/2) + 5*f*(f + g*x)**(7/2)/7 - (f + g*x)**(9/2)/9)/g**5 - 2*c*e**3*(f**6/sqrt(f + g*x) + 6*f**5*sqrt(f
 + g*x) - 5*f**4*(f + g*x)**(3/2) + 4*f**3*(f + g*x)**(5/2) - 15*f**2*(f + g*x)**(7/2)/7 + 2*f*(f + g*x)**(9/2
)/3 - (f + g*x)**(11/2)/11)/g**5)/g, Ne(g, 0)), ((a*d**3*x + c*e**3*x**6/6 + x**5*(b*e**3 + 3*c*d*e**2)/5 + x*
*4*(a*e**3 + 3*b*d*e**2 + 3*c*d**2*e)/4 + x**3*(3*a*d*e**2 + 3*b*d**2*e + c*d**3)/3 + x**2*(3*a*d**2*e + b*d**
3)/2)/sqrt(f), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 565 vs. \(2 (271) = 542\).
time = 4.32, size = 565, normalized size = 1.97 \begin {gather*} \frac {2 \, {\left (3465 \, \sqrt {g x + f} a d^{3} + \frac {1155 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} - 3 \, \sqrt {g x + f} f\right )} b d^{3}}{g} + \frac {3465 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} - 3 \, \sqrt {g x + f} f\right )} a d^{2} e}{g} + \frac {231 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} c d^{3}}{g^{2}} + \frac {693 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} b d^{2} e}{g^{2}} + \frac {693 \, {\left (3 \, {\left (g x + f\right )}^{\frac {5}{2}} - 10 \, {\left (g x + f\right )}^{\frac {3}{2}} f + 15 \, \sqrt {g x + f} f^{2}\right )} a d e^{2}}{g^{2}} + \frac {297 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} c d^{2} e}{g^{3}} + \frac {297 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} b d e^{2}}{g^{3}} + \frac {99 \, {\left (5 \, {\left (g x + f\right )}^{\frac {7}{2}} - 21 \, {\left (g x + f\right )}^{\frac {5}{2}} f + 35 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{2} - 35 \, \sqrt {g x + f} f^{3}\right )} a e^{3}}{g^{3}} + \frac {33 \, {\left (35 \, {\left (g x + f\right )}^{\frac {9}{2}} - 180 \, {\left (g x + f\right )}^{\frac {7}{2}} f + 378 \, {\left (g x + f\right )}^{\frac {5}{2}} f^{2} - 420 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{3} + 315 \, \sqrt {g x + f} f^{4}\right )} c d e^{2}}{g^{4}} + \frac {11 \, {\left (35 \, {\left (g x + f\right )}^{\frac {9}{2}} - 180 \, {\left (g x + f\right )}^{\frac {7}{2}} f + 378 \, {\left (g x + f\right )}^{\frac {5}{2}} f^{2} - 420 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{3} + 315 \, \sqrt {g x + f} f^{4}\right )} b e^{3}}{g^{4}} + \frac {5 \, {\left (63 \, {\left (g x + f\right )}^{\frac {11}{2}} - 385 \, {\left (g x + f\right )}^{\frac {9}{2}} f + 990 \, {\left (g x + f\right )}^{\frac {7}{2}} f^{2} - 1386 \, {\left (g x + f\right )}^{\frac {5}{2}} f^{3} + 1155 \, {\left (g x + f\right )}^{\frac {3}{2}} f^{4} - 693 \, \sqrt {g x + f} f^{5}\right )} c e^{3}}{g^{5}}\right )}}{3465 \, g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+b*x+a)/(g*x+f)^(1/2),x, algorithm="giac")

[Out]

2/3465*(3465*sqrt(g*x + f)*a*d^3 + 1155*((g*x + f)^(3/2) - 3*sqrt(g*x + f)*f)*b*d^3/g + 3465*((g*x + f)^(3/2)
- 3*sqrt(g*x + f)*f)*a*d^2*e/g + 231*(3*(g*x + f)^(5/2) - 10*(g*x + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*c*d^3/g
^2 + 693*(3*(g*x + f)^(5/2) - 10*(g*x + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*b*d^2*e/g^2 + 693*(3*(g*x + f)^(5/2
) - 10*(g*x + f)^(3/2)*f + 15*sqrt(g*x + f)*f^2)*a*d*e^2/g^2 + 297*(5*(g*x + f)^(7/2) - 21*(g*x + f)^(5/2)*f +
 35*(g*x + f)^(3/2)*f^2 - 35*sqrt(g*x + f)*f^3)*c*d^2*e/g^3 + 297*(5*(g*x + f)^(7/2) - 21*(g*x + f)^(5/2)*f +
35*(g*x + f)^(3/2)*f^2 - 35*sqrt(g*x + f)*f^3)*b*d*e^2/g^3 + 99*(5*(g*x + f)^(7/2) - 21*(g*x + f)^(5/2)*f + 35
*(g*x + f)^(3/2)*f^2 - 35*sqrt(g*x + f)*f^3)*a*e^3/g^3 + 33*(35*(g*x + f)^(9/2) - 180*(g*x + f)^(7/2)*f + 378*
(g*x + f)^(5/2)*f^2 - 420*(g*x + f)^(3/2)*f^3 + 315*sqrt(g*x + f)*f^4)*c*d*e^2/g^4 + 11*(35*(g*x + f)^(9/2) -
180*(g*x + f)^(7/2)*f + 378*(g*x + f)^(5/2)*f^2 - 420*(g*x + f)^(3/2)*f^3 + 315*sqrt(g*x + f)*f^4)*b*e^3/g^4 +
 5*(63*(g*x + f)^(11/2) - 385*(g*x + f)^(9/2)*f + 990*(g*x + f)^(7/2)*f^2 - 1386*(g*x + f)^(5/2)*f^3 + 1155*(g
*x + f)^(3/2)*f^4 - 693*sqrt(g*x + f)*f^5)*c*e^3/g^5)/g

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 283, normalized size = 0.99 \begin {gather*} \frac {{\left (f+g\,x\right )}^{9/2}\,\left (2\,b\,e^3\,g-10\,c\,e^3\,f+6\,c\,d\,e^2\,g\right )}{9\,g^6}+\frac {{\left (f+g\,x\right )}^{7/2}\,\left (6\,c\,d^2\,e\,g^2-24\,c\,d\,e^2\,f\,g+6\,b\,d\,e^2\,g^2+20\,c\,e^3\,f^2-8\,b\,e^3\,f\,g+2\,a\,e^3\,g^2\right )}{7\,g^6}+\frac {2\,{\left (f+g\,x\right )}^{5/2}\,\left (d\,g-e\,f\right )\,\left (c\,d^2\,g^2-8\,c\,d\,e\,f\,g+3\,b\,d\,e\,g^2+10\,c\,e^2\,f^2-6\,b\,e^2\,f\,g+3\,a\,e^2\,g^2\right )}{5\,g^6}+\frac {2\,\sqrt {f+g\,x}\,{\left (d\,g-e\,f\right )}^3\,\left (c\,f^2-b\,f\,g+a\,g^2\right )}{g^6}+\frac {2\,{\left (f+g\,x\right )}^{3/2}\,{\left (d\,g-e\,f\right )}^2\,\left (3\,a\,e\,g^2+b\,d\,g^2+5\,c\,e\,f^2-4\,b\,e\,f\,g-2\,c\,d\,f\,g\right )}{3\,g^6}+\frac {2\,c\,e^3\,{\left (f+g\,x\right )}^{11/2}}{11\,g^6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*x)^3*(a + b*x + c*x^2))/(f + g*x)^(1/2),x)

[Out]

((f + g*x)^(9/2)*(2*b*e^3*g - 10*c*e^3*f + 6*c*d*e^2*g))/(9*g^6) + ((f + g*x)^(7/2)*(2*a*e^3*g^2 + 20*c*e^3*f^
2 - 8*b*e^3*f*g + 6*b*d*e^2*g^2 + 6*c*d^2*e*g^2 - 24*c*d*e^2*f*g))/(7*g^6) + (2*(f + g*x)^(5/2)*(d*g - e*f)*(3
*a*e^2*g^2 + c*d^2*g^2 + 10*c*e^2*f^2 + 3*b*d*e*g^2 - 6*b*e^2*f*g - 8*c*d*e*f*g))/(5*g^6) + (2*(f + g*x)^(1/2)
*(d*g - e*f)^3*(a*g^2 + c*f^2 - b*f*g))/g^6 + (2*(f + g*x)^(3/2)*(d*g - e*f)^2*(3*a*e*g^2 + b*d*g^2 + 5*c*e*f^
2 - 4*b*e*f*g - 2*c*d*f*g))/(3*g^6) + (2*c*e^3*(f + g*x)^(11/2))/(11*g^6)

________________________________________________________________________________________